export function request(method, url, data) {
	return new Promise((resolve, reject)=>{
		uni.request({
			method,
			url,
			data,
			header: {
				'content-type': 'application/json',
			},
			timeout: 5000,
			success: (res)=>{
				if(res.statusCode === 200) {
					resolve(res.data)
				}else {
					reject(new Error(res.statusCode))
				}
			},
			fail: (err) => {
				reject(err)
			}
		})
	})
}